﻿using Platformer_Example.Controller.Input;
using Platformer_Example.Screen.Common;
using System;
using Transformable_Engine_v2.Engine.Input;

namespace Platformer_Example.Screen.QuickGame
{
    public partial class QuickGame : BaseScreen
    {
        public override void LoadContent()
        {
            Console.WriteLine("Enter your profile name: ");
            Console.Write(">> ");
            /*
            var name = Console.ReadLine();
            /*/
            var name = "User #" + Guid.NewGuid().ToString("N").Substring(0, 4);
            Console.WriteLine(name);
            //*/
            Console.WriteLine("Profile name registered: {0}", name);
            Console.WriteLine("(S) Start a server");
            Console.WriteLine("(J) Join a game");
            Console.Write(">> ");
            /*
            var choice = Console.ReadLine().ToLower();
            /*/
            var choice = "s";
            //*/

            if (choice == "s")
            {
                StartServer(name);
            }
            else
            {
                StartClient(name);
            }

            base.LoadContent();
        }

        public override void Keypressed(InputState.Key key)
        {
            
        }

        public override void KeyReleased(InputState.Key key)
        {

        }

        public override void InvalidKeyPressed(KeyboardInput.Key keyCode)
        {

        }
    }
}